-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent empty void at the bottom of editor when block directory results are present #63397
Conversation
Size Change: +5 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
Flaky tests detected in 5a6ff8a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9885559709
|
I was only able to reproduce the original issue on WP 6.6-RC2. Never mind. The issue just randomly showed up again on Gutenberg trunk. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
When I investigated the absolute-positioned element that was causing this problem, I found that it was the VisuallyHidden
component inside the DownloadableBlockListItem
component. Therefore, I think it makes sense to apply position: relative
to the DownloadableBlockListItem
component.
…ts are present (#63397) Co-authored-by: talldan <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: annezazu <[email protected]>
I just cherry-picked this PR to the wp/6.6 branch to get it included in the next release: d034a73 |
Bugfixes included: * [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors]. * [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule]. * [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied]. * [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present]. * [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border]. * [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes]. * [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present]. * [WordPress/gutenberg#62675 fix: wp icon focus issue]. * [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element]. Props ellatrix. Fixes #61692. See #61660, #61630, #61656. git-svn-id: https://develop.svn.wordpress.org/trunk@58757 602fd350-edb4-49c9-b593-d223f7449a82
Bugfixes included: * [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors]. * [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule]. * [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied]. * [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present]. * [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border]. * [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes]. * [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present]. * [WordPress/gutenberg#62675 fix: wp icon focus issue]. * [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element]. Props ellatrix. Fixes #61692. See #61660, #61630, #61656. Built from https://develop.svn.wordpress.org/trunk@58757 git-svn-id: http://core.svn.wordpress.org/trunk@58159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Bugfixes included: * [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors]. * [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule]. * [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied]. * [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present]. * [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border]. * [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes]. * [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present]. * [WordPress/gutenberg#62675 fix: wp icon focus issue]. * [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element]. Props ellatrix. Fixes #61692. See #61660, #61630, #61656. Built from https://develop.svn.wordpress.org/trunk@58757 git-svn-id: https://core.svn.wordpress.org/trunk@58159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Bugfixes included: * [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors]. * [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule]. * [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied]. * [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present]. * [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border]. * [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes]. * [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present]. * [WordPress/gutenberg#62675 fix: wp icon focus issue]. * [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element]. Reviewed by spacedmonkey. Merges [58757] to the 6.6 branch. Props ellatrix. Fixes #61692. See #61660, #61630, #61656. git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58760 602fd350-edb4-49c9-b593-d223f7449a82
Bugfixes included: * [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors]. * [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule]. * [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied]. * [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present]. * [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border]. * [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes]. * [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present]. * [WordPress/gutenberg#62675 fix: wp icon focus issue]. * [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element]. Reviewed by spacedmonkey. Merges [58757] to the 6.6 branch. Props ellatrix. Fixes #61692. See #61660, #61630, #61656. Built from https://develop.svn.wordpress.org/branches/6.6@58760 git-svn-id: http://core.svn.wordpress.org/branches/6.6@58162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…ts are present (WordPress#63397) Co-authored-by: talldan <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: annezazu <[email protected]>
What?
Fixes #63384
Why?
The issue happens because of elements with
position: absolute
in the block directory results. When elements with this positioning are relative to an element that's outside of the scroll container (an ancestor of the scroll container), they can cause weird overflow issues. Applyingposition: relative
to a parent within the scroll container fixes the issue.How?
Because the absolutely positioned elements are within the
block-directory-downloadable-block-list-item
, I decided to applyposition: relative
there, with the idea that this component should be reusable anywhere and not cause these weird overflow issues.I guess the previous fix (in #60287) regressed because the tabs are now shown when there a search results, and the fix only applied to the no tabs view. It could also be an idea to apply another fix similar to that one in addition to this PR so that inserter search results can never cause overflow.
Testing Instructions
Screenshots or screencast
Before
After